<script setup>
// 定义props ：简单的模块，抽象成props
defineProps({
    // 主标题
    title: {
        type: String
    },
    // 副标题
    subTitle: {
        type: String
    }
})
</script>
<template>
    <div class="car-item">
        <div class="car-item-header">
            <div class="car-item-header-icon">{{title}}</div>
            <div class="car-item-header-title">{{subTitle}}</div>
        </div>
        <div class="car-item-content">
            <slot />
        </div>
    </div>
</template>
<style scoped lang="scss">
.car-item {
    width: 100%;
    padding: 0 20px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 20px;
}
.car-item-header {
    box-sizing: border-box;
    height: 50px;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
}
.car-item-header-icon {
    width: 30px;
    height: 20px;
    background: #fabe00;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 700;
    color: #171721;
    line-height: 20px;
    text-align: center;
    font-family: Arial;
}
.car-item-header-title {
    margin-left: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #171721;
}
.car-item-content {
    padding: 10px 0;
    font-size: 14px;
    font-weight: 400;
    color: #171721;
    line-height: 22px;
}
</style>